import { createStore, applyMiddleware, combineReducers, compose } from 'redux'
import { composeWithDevTools } from 'redux-devtools-extension'
import thunkMiddleware from 'redux-thunk'
import thunk from 'redux-thunk'
import { BlogReducer } from './blog.redux'
import { UserReducer } from './user.redux'

const state = combineReducers({
    BlogReducer, UserReducer
})
export const initTotalStore = () => {
    return createStore(state, compose(
        applyMiddleware(thunk), composeWithDevTools(applyMiddleware(thunkMiddleware))
    ))
}